package flc.ast.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;

import com.bumptech.glide.Glide;

import flc.ast.BaseAc;
import flc.ast.HomeActivity;
import flc.ast.R;
import flc.ast.databinding.ActivityChangeSizeBinding;
import flc.ast.databinding.ActivityChangeSizeResultBinding;

public class ChangeSizeResultActivity extends BaseAc<ActivityChangeSizeResultBinding> {

    public static String imgPath;

    @Override
    protected int onCreate() {
        return R.layout.activity_change_size_result;
    }

    @Override
    protected void initView() {
        mDataBinding.ivChangeSizeResultBack.setOnClickListener(v -> onBackPressed());

        mDataBinding.tvAgainChange.setOnClickListener(this);
        mDataBinding.tvComplete.setOnClickListener(this);
    }

    @Override
    protected void onClickCallback(View v) {
        switch (v.getId()) {
            case R.id.tvAgainChange://继续压缩
                finish();
                break;
            case R.id.tvComplete://完成
                startActivity(HomeActivity.class);
                break;
        }
    }


    @Override
    protected void initData() {
        Glide.with(mContext).load(imgPath).into(mDataBinding.ivImg);
    }
}